package com.trainfinder;

import java.util.Calendar;

import org.apache.struts.action.ActionForm;

import com.trainfinder.datapersistace.TicketType;

public class SearchActionForm extends ActionForm {

	public SearchActionForm() {
		
		Calendar calendar = Calendar.getInstance();
		calendar.add(Calendar.DAY_OF_MONTH,7);
		day = Integer.toString(calendar.get(Calendar.DAY_OF_MONTH));
		 
		month = Integer.toString(calendar.get(Calendar.MONTH) + 1);

		if (month.length() == 1) {
			month = "0" + month;
		}

		String year = Integer.toString(calendar.get(Calendar.YEAR)-2000);
		if (year.length() == 1) {
			year = "0" + year;
		}
		month = month + year;
	
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	String day;

	String month;

	 

	String toLocation  = "paris";

	String fromLocation  = "london";

	String ticketType = TicketType.NON_FLEXIBLE.toString();
	
	// String saturdayNight = "AWAY_ON_SATURDAY";

	public String getDay() {
		return day;
	}

	public void setDay(String day) {
		this.day = day;
	}

	public String getFromLocation() {
		return fromLocation;
	}

	public void setFromLocation(String fromLocation) {
		this.fromLocation = fromLocation;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	public String getTicketType() {
		return ticketType;
	}

	public void setTicketType(String ticketType) {
		this.ticketType = ticketType;
	}

	public String getToLocation() {
		return toLocation;
	}

	public void setToLocation(String toLocation) {
		this.toLocation = toLocation;
	}

//	public String getSaturdayNight() {
//		return saturdayNight;
//	}
//
//	public void setSaturdayNight(String saturdayNight) {
//		this.saturdayNight = saturdayNight;
//	}

	

}
